package com.wen.mediatorPattern;

/**
 * 同事类使用get/set添加同事类 是因为中介里面可以只有部分同事类
 * 同事里面通过构造器注入 是因为同事类里面必须又中介角色，不然无法效用里面的其他方法
 */
public abstract class Mediator {
    private ConcreteColleagueA concreteColleagueA;
    private ConcreteColleagueB concreteColleagueB;

    public ConcreteColleagueA getConcreteColleagueA() {
        return concreteColleagueA;
    }

    public void setConcreteColleagueA(ConcreteColleagueA concreteColleagueA) {
        this.concreteColleagueA = concreteColleagueA;
    }

    public ConcreteColleagueB getConcreteColleagueB() {
        return concreteColleagueB;
    }

    public void setConcreteColleagueB(ConcreteColleagueB concreteColleagueB) {
        this.concreteColleagueB = concreteColleagueB;
    }

    public abstract  void doSomethingA();

    public abstract void doSomethingB();


}
